package com.xinqi.xinqidev.utils;

import lombok.Data;

import javax.websocket.Session;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class UserHolder {
    private static final Map<Long, Byte> onlineUsers = new ConcurrentHashMap<>();

    public static Byte getUser(Long id){
        return onlineUsers.get(id);
    }

    public static void remove(Long id){
        onlineUsers.remove(id);
    }
    public static void addUser(Long id){
        onlineUsers.put(id, (byte) 1);
    }


}
